package HashMap;

import java.util.LinkedList;

public class HashMap1 {
    public static void main(String[] args) {

    }
}
class  HashTab {
    private LinkedList<Emp>[] linkedLists;
    private int size;
    public HashTab(int size){
        this.size=size;
        this.linkedLists = new LinkedList[size];

    }
    public int hashFun(int id){
        return id%size;
    }

    public void addEmp(Emp emp){

        int empLinkedListNo = hashFun(emp.getId());
        linkedLists[empLinkedListNo].add(emp);
    }
    public void list(){
        for (int i=0;i<size;i++){
            System.out.println(linkedLists[i]);
        }
    }
    public void findEmpById(int id){
        int empLinkedListNo=hashFun(id);
    }

}
class Emp{
    private int id;
    private String name;

    public Emp(int id, String name) {
        this.id = id;
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}